﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Game_MVC3.Models
{
    public class Poll
    {
        [Key]
        public int ID { get; set; }

        [Required(ErrorMessage = "Poll's Title cannot be empty.")]
        public string Title { get; set; }

        [Column("creation_date")]
        [Editable(false)]
        [Display(Name = "Creation Date")]
        [DataType(DataType.DateTime, ErrorMessage = "Creation Date must be a valid date.")]
        public DateTime CreationDate { get; set; }

        [Column("expiration_date")]
        [Required(ErrorMessage = "Expiration Date cannot be empty.")]
        [Display(Name = "Expiration Date", Description = "Date when the Poll expires.")]
        [DataType(DataType.DateTime, ErrorMessage = "Expiration Date must be a valid date.")]
        public DateTime ExpirationDate { get; set; }

    }
}